package org.ffrl.design.factory.method;

import org.ffrl.design.factory.Pizza;
import org.ffrl.design.factory.PizzaType;

public abstract class PizzaStore {
    
    public Pizza orderPizza(PizzaType type) {
        Pizza pizza = createPizza(type);
        pizza.prepare();
        pizza.box();
        return pizza;
    }
    
    abstract Pizza createPizza(PizzaType type);
}
